package org.example.thread;

import java.util.Comparator;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ThreadTest {
    static int tips = 100;

    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(10);
        ThreadDemo t = new ThreadDemo(tips);
        Thread t1 = new Thread(t, "窗口1");
        Thread t2 = new Thread(t, "窗口2");
        Thread t3 = new Thread(t, "窗口3");
//        System.out.println(t1.getName());
//        pool.submit(t1);
//        pool.submit(t2);
//        pool.submit(t3);
        t1.start();
        t2.start();
        t3.start();
    }
}
